Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with debug symbols #87

Closed
wants to merge 1 commit into from
Closed

Build with debug symbols #87

wants to merge 1 commit into from

Conversation

os12
Copy link

@os12 os12 commented Sep 8, 2023

  • this way we can actually use gdb to debug issues with the executable

 - this way we can actually use `gdb` to debug issues with the executable
@wllm-rbnt
Copy link
Contributor

wllm-rbnt commented Sep 8, 2023

I wouldn't go for debug build by default since you can simply add the debug compile options to the cmake command you use:

$ cmake -D CMAKE_C_FLAGS="-g -ggdb3" -B build -G Ninja
$ ninja -C build

or with make:

$ cmake -D CMAKE_C_FLAGS="-g -ggdb3" -B build
$ cd build
$ make

@os12
Copy link
Author

os12 commented Sep 8, 2023

I think it's totally appropriate to build with debug symbols by default. Note, this is not a "debug build" in the sense of optimization.

If you folks decide to create some kind of minimal package (e.g. a .deb file) you can just run strip.

@adulau
Copy link
Owner

adulau commented Sep 8, 2023

I tend to agree that debug symbols by default can be useful especially to get some better bug reports ;-)

@wllm-rbnt
Copy link
Contributor

@os12 sure, you're right about optimization. Actually, in the previous build system (autotools based), I implemented 2 distinct options: --enable-debug and --disable-optimization.
It was not ported to the new cmake based setup yet.
We could set -g by default, and add an option to enable more debug facilities (-ggdb3 & -DDEBUG) and, another one, to disable optimization (-O0).

@adulau
Copy link
Owner

adulau commented Sep 11, 2023

Following #91 it should be ok. Feel free to reopen another PR if required. Thank you again for the proposal and helping for the discussions.

@adulau adulau closed this Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants